<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>larryms框架之pdf扩展组件</title>
    <meta name="keywords" content="swiper" />
    <meta name="description" content="swiper" />
    <meta name="Author" content="larry" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="Shortcut Icon" href="${base}/favicon.ico" />
    <!-- load css -->
    <link rel="stylesheet" type="text/css" href="${base}/larryms/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="${base}/larryms/css/admin/base.css" media="all">
    <link rel="stylesheet" type="text/css" href="${base}/larryms/css/animate.css" media="all">
    <link rel="stylesheet" type="text/css" href="${base}/larryms/css/admin/library.css" media="all">
</head>

<body class="larryms-layout-bgB box-blank  library-box">
<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<div class="layui-fluid margin15">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-lg12 layui-col-md12 layui-col-sm12 layui-col-xs12">
            <section class="layui-card">
                <div class="layui-card-header header-title library-tit">
                    <h1>LarryMS框架扩展之<cite>pdf组件</cite><em>【提供于标准版及以上】</em></h1>
                </div>
                <div class="layui-card-body library-body">
                    <p class="library-tips">
                        <cite>pdf组件：</cite>pdf阅读组件是LarryMS框架封装来自于GitHub的PDFObject轻量级JS库，用于在HTML文档中动态嵌入PDF，支持IE9-11，MS Edge，Safari，Firefox，Chrome。备注：PDFObject不是渲染引擎。PDFObject只是将一个 embed元素写入页面，并依赖于浏览器或浏览器插件来呈现PDF。如果浏览器不支持嵌入的PDF，则PDFObject无法强制浏览器呈现PDF【移动端部分浏览器不支持pdf嵌套，可以等larryms框架后续更新pdf组件】。LarryMS框架后续更新中会提供Mozilla的PDF.js功能更全面支持自定义工具栏；下面是PDFObject库封装后使用示例：
                    </p>
                </div>
            </section>
        </div>
        <div class="layui-col-lg12 layui-col-md12 layui-col-sm12 layui-col-xs12">
            <section class="layui-card">
                <div class="layui-card-body" style="padding: 15px;">
                    <blockquote class="layui-elem-quote larryms-doc-quote" style="font-size: 14px;color: #09B4EF;line-height: 25px;">
                        larryms官方社区提供所有所提供扩展组件的维护和更新。当前版本：PDFObject v2.0
                    </blockquote>
                </div>
            </section>
        </div>
    </div>
    <div class="layui-row  layui-col-space15 larryms-pdf">
        <div class="layui-col-lg6 layui-col-md6 layui-col-sm12 layui-col-xs12">
            <section class="layui-card">
                <div class="layui-card-header">
                    PDF【效果示例】
                </div>
                <div class="layui-card-body geetest-body">
                    <div class="pdf-box" id="pdfBox"></div>
                </div>
            </section>
        </div>
        <div class="layui-col-lg6 layui-col-md6 layui-col-sm12 layui-col-xs12">
            <section class="layui-card">
                <div class="layui-card-header">
                    PDF【Code示例】
                </div>
                <div class="layui-card-body">
                        <pre class="layui-code">
#pdf阅读组件相对使用很简单，正如左侧预览效果，让浏览器支持PDF文件展示
layui.use('pdfobject',function(){
    var pdfobject = layui.pdfobject;
    //#没错就是这么简洁，一行代码实现pdf文件阅读，打印，常规操作如：全屏预览、下载、打印、缩放，该组件可用于一般浏览器pdf嵌套显示，更强劲丰富的功能可等待LarryMS框架后续提供的PDF组件。
    pdfobject.embed('../larryms/data/resource/pdf.pdf','#pdfBox');
});
//CSS 支持
.larryms-pdf .pdfobject-container { height: 530px;}
.larryms-pdf .pdfobject { border: 1px solid #666; }
</pre>
                </div>
            </section>
        </div>
    </div>
</div>
<!-- 加载js文件-->
<script type="text/javascript" src="${base}/larryms/layui/layui.js"></script>
<script type="text/javascript">
    layui.config({
        version: "2.0.8",
        base: '${base}/larryms/',
        page: 'thirddemo',
        identified: 'pdfobject'
    }).extend({
        larry: 'js/base'
    }).use('larry');
</script>
</body>

</html>